<template>
	<view class="blood">
		<view class="watch"></view>
		<view class="background">
			<view class="header">
				<view class="header-left">
					<image src="../../static/blood/Group54@2x.png" mode="" @click="back"></image>
				</view>
				<view class="header-right">
					<image src="../../static/blood/ht1@2x.png" mode="" class="header-right-image"></image>
					<text>第37轮</text>
					<image src="../../static/blood/Frame@2x.png" mode="" class="header-right-up"></image>
				</view>
			</view>
			<view class="content">
				<view class="Tab">
					<u-tabs :list="list" @change="changeTabs" :current="current" lineColor="#fff" :activeStyle="{ color: '#fff' }" :inactiveStyle="{color:'#aaa'}"></u-tabs>
				</view>
				<Reward v-if="index == '0'"></Reward>
				<Award v-if="index == '1'"></Award>
				<Monkey v-if="index == '2'" ></Monkey>
				<Mine v-if="index == '3'"></Mine>
			</view>
		</view>
	</view>
</template>

<script>
	import Reward from './reward.vue';
	import Award from './award.vue';
	import Monkey from './monkey.vue';
	import Mine from './mine.vue';
	export default {
		components: {
			Reward,
			Award,
			Monkey,
			Mine
		},
		data() {
			return {
				index: null,
				list: [
					{
						name: '奖励排行榜'
					},
					{
						name: '奖池排行榜'
					},
					{
						name: '猴王数据'
					},
					{
						name: '我的'
					}
				],
				current: 0,
			};
		},
		methods:{
			changeTabs(index){
				if(index.index==0){
					this.index=0
				}else if(index.index==1){
					this.index=1
				}else if(index.index==2){
					this.index=2
				}else{
					this.index=3
				}
			},
			back(){
				uni.navigateBack(-1);
			},
		}
	}
</script>
<style lang="scss" scoped>
  .blood{
		position: relative;
		min-height: 100vh;
		background: #D0FFEB;
		// color: #7f7f7fa6;
		.watch{
			background:url('../../static/blood/watch.png');
			background-size:cover;
			width: 309rpx;
			height: 309rpx;
			position: absolute;
			right: 0;
			top: 0;
			opacity: 0.7;
		}
		.background{
			min-height: 100vh;
			background: linear-gradient(219deg, rgba(0,0,0,0.44) 0%, #000000 100%);
			opacity: 1;
			.header{
				height: 69rpx;
				display: flex;
				align-items: center;
				padding: 97rpx 28.64rpx 50rpx 28.64rpx;
				.header-left{
					image{
						width: 38rpx;
						height: 38rpx;
						padding-right: 187rpx;
						background-size:cover;
						display: flex;
						align-items: center;
					}
				}
				.header-right{
					width: 223rpx;
					height: 65rpx;
					background-color: #000000A6;
					border-radius: 95.42rpx;
					z-index:1;
					display: flex;
					align-items: center;
					.header-right-image{
						width: 82.06rpx;
						height: 69rpx;
						margin-left:-5rpx;
					}
					text{
						font-size: 27rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 800;
						color: #FFFFFF;
						padding-left: 16rpx;
						padding-right: 6rpx;
					}
					.header-right-up{
						width: 23rpx;
						height: 17rpx;
					}
				}
			}
		  .content{
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				.Tab{
					margin-bottom: 20rpx;
					display: flex;
					justify-content: center;
					font-size: 27rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 800;
					color: #FFFFFF;
				}
			}
		}

	}
</style>

